<template>
	<view class="f_box" @click="clickBox">
		<view class="box" >
		<view class="img">
			
			<image class="showimg" :src="getImgPath(typeData.path)" mode="aspectFill"></image>
			
		</view>
		
		<view class="text">{{typeData.name}}</view>
		
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			typeData: {
				type: Object,
				default: {}
			}
		},
		name:"myNav",
		
		data() {
			return {
				
			};
		},
		methods: {
			getImgPath(path){
				// console.log(config)
				return config.imgurl + path
			},
			clickBox(){
					uni.navigateTo({
						url:'/pages/imginfo/imginfo?id=' + this.typeData.id
					})
				// console.log(this.path)
				// if (this.path){
				// 	uni.navigateTo({
				// 		url:this.path
				// 	})
				// }
				// else{
				// 	uni.showToast({
				// 		title: '模块开发中...',
				// 		duration: 2000,
				// 		icon:'error'
				// 	});
				// }
				
			}
		}
	}
</script>

<style lang="scss">

	.box{
		width: 130rpx;
		height: 200rpx;
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
		
		.img{
			
			margin: 10rpx 10rpx 0rpx 10rpx;
		}
		.text{
			text-align: center;
			color: #000000;
			word-break: break-all;
			font-size: 25rpx;
			margin-top: -10rpx;
		}
	}
	.showimg{
		width: 130rpx;
		height: 130rpx;
		border-radius: 130rpx;
	}
	
</style>